﻿using BlazorAdmin.Generator.Models;
using BootstrapBlazor.Components;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;

namespace BlazorAdmin.Generator.Generators
{
    public class GenerateSetting
    {
        [NotNull]
        [DisplayName("数据源")]
        public string ProviderName { get; set; } = EnumDbProvider.SqlServer.ToString();

        [DisplayName("连接字符串")]
        public string ConnectionString { get; set; }

        public string DefaultConnectionString { get; set; }

        public string TableName { get; set; }

        [NotNull]
        [DisplayName("表名")]
        [Required(ErrorMessage = "{0}不可为空")]
        public string GenTableNames { get; set; }

        public int GenTableCount { get; set; }

        [NotNull]
        [DisplayName("代码风格")]
        [Required(ErrorMessage = "{0}不可为空")]
        public string CodeStyle { get; set; }

        public string TimePath { get; set; }

        [NotNull]
        [DisplayName("应用简称")]
        [Required(ErrorMessage = "{0}不可为空")]
        public string RootPath { get; set; }

        public string RootFilePath { get; set; }

        [NotNull]
        [DisplayName("Entity目录")]
        [Required(ErrorMessage = "{0}不可为空")]
        public string EntityPath { get; set; }

        public string EntityFilePath { get; set; }

        [NotNull]
        [DisplayName("Interface目录")]
        [Required(ErrorMessage = "{0}不可为空")]
        public string InterfacePath { get; set; }

        public string InterfaceFilePath { get; set; }

        [NotNull]
        [DisplayName("Service目录")]
        [Required(ErrorMessage = "{0}不可为空")]
        public string ServicePath { get; set; }

        public string ServiceFilePath { get; set; }

        [NotNull]
        [DisplayName("Razor Component目录")]
        [Required(ErrorMessage = "{0}不可为空")]
        public string RazorComponentPath { get; set; }

        public string RazorComponentFilePath { get; set; }

        [NotNull]
        [DisplayName("Razor Model目录")]
        [Required(ErrorMessage = "{0}不可为空")]
        public string RazorModelPath { get; set; }

        public string RazorModelFilePath { get; set; }

        [NotNull]
        [DisplayName("Razor Page目录")]
        [Required(ErrorMessage = "{0}不可为空")]
        public string RazorPagePath { get; set; }

        public string RazorPageFilePath { get; set; }

        public string ParscalTableName { get; set; }

        public string EntityNameSpace { get; set; }

        public string InterfaceNameSpace { get; set; }

        public string ServiceNameSpace { get; set; }

        public string RazorComponentNameSpace { get; set; }

        public string RazorModelNameSpace { get; set; }

        public string RazorPageNameSpace { get; set; }

        public List<ConsoleMessageItem> MsgItems = new();
    }
}